<div ng-controller="TrainningEnrollCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">培训报名情况</h1>
    </div>
    <div class="wrapper-md">
        <form role="form" ng-submit="search()">
            <div class="row">
                <label class="control-label col-md-1 text-right">分类</label>
                <div class="col-md-2">
                    <select class="form-control" ng-model="searchForm.Category" ng-options="c as c.Name for c in categoryList"></select>
                </div>
                <label class="control-label col-md-1 text-right">培训</label>
                <div class="col-md-2">
                    <select class="form-control col-md-2" ng-model="searchForm.TrainningId" ng-options="c.Id as c.Title for c in searchForm.Category.Trainnings"></select>
                </div>
                <label class="control-label col-md-1 text-right">手机号</label>
                <div class="col-md-2">
                    <input class="form-control col-md-2" ng-model="searchForm.Phone" type="tel" />
                </div>
            </div>
            <div class="row" style="margin-top:10px">
                <label class="control-label  col-md-1 text-right">报名日期</label>
                <div class="col-md-2">
                    <input type="text" class="form-control" readonly="readonly" style="cursor: pointer" datepicker-popup="yyyy-MM-dd" ng-model="searchForm.Start"
                           is-open="isStartOpen" required close-text="关闭" clear-text="清除" current-text="今天" ng-mousedown="openCalendar($event,'start')"/>
                </div>
                <label class="col-md-1 control-label text-center">至</label>
                    <div class="col-md-2">
                        <input type="text" class="form-control" readonly="readonly" style="cursor: pointer" datepicker-popup="yyyy-MM-dd" ng-model="searchForm.End"
                               is-open="isEndOpen" required close-text="关闭" clear-text="清除" current-text="今天" ng-mousedown="openCalendar($event,'end')" />
                    </div>
                    <button type="submit" class="btn btn-success"><i class="fa fa-search"></i> 查询</button>
                </div>
        </form>

        <div class="row m-t-xs">
            <div class="scroll">
                <table class="table table-bordered table-hover">
                    <tr>
                        <th>培训名称</th>
                        <th>姓名</th>
                        <th>年龄</th>
                        <th>联系方式</th>
                        <th>身份证</th>
                        <th>性别</th>
                        <th>报名时间</th>
                        <th>审核状态</th>
                        <th></th>
                    </tr>
                    <tr ng-repeat="item in enrollList" ng-class="{'text-red':item.EnrollStatus==2}">
                        <td>{{::item.TrainningName}}</td>
                        <td>{{::item.Name}}</td>
                        <td>{{::item.Age}}</td>
                        <td>{{::item.Phone}}</td>
                        <td>{{::item.IdCard}}</td>
                        <td>{{::item.Gender==1?'男':item.Gender==2?'女':'未知'}}</td>
                        <td>{{::item.CreateTime|date:'yyyy-MM-dd HH:mm'}}</td>
                        <td>{{item.EnrollStatus==1?'通过':item.EnrollStatus==2?'未通过':'未审核'}}</td>
                        <td>
                            <a href="javascript:;" ng-click="audit(item)"><i class="fa fa-th-large"></i>审核</a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="row">
            <div class="col-md-10">
                <pagination total-items="page.total" ng-model="page.index" max-size="5" items-per-page="page.size" previous-text="上一页" next-text="下一页"
                            first-text="首页" last-text="末页" class="pagination-sm pull-right m-n" boundary-links="true"></pagination>
            </div>
            <div class="col-md-2">
                每页
                <select ng-model="page.size" class="form-control w-xs" style="display: inline-block" ng-options="s for s in [10,20,50]"></select> 行
            </div>

        </div>
    </div>
</div>